<?php

/**
 * MobileWebNews class
 *
 * @author Julot <andy.julot@gmail.com>
 * @since Saturday, August 20, 2011. 05:49 PM
 */
class MobileWebNews extends WebNews {

	public $verifyCode;

	/**
	 * @return array validation rules for model attributes.
	 */
	public function rules() {
		// NOTE: you should only define rules for those attributes that
		// will receive user inputs.
		return array(
			array('sender, contact, value', 'required'),
			array('dateTime, sticky, hidden', 'numerical', 'integerOnly'=>true),
			array('sender, contact', 'length', 'max'=>255),
			array(
				'verifyCode',
				'captcha',
				'allowEmpty'=>!CCaptcha::checkRequirements(),
			),
		);
	}

	/**
	 * @return array customized attribute labels (name=>label)
	 */
	public function attributeLabels() {
		$labels = parent::attributeLabels();
		$labels['verifyCode'] = 'Masukkan kata diatas';
		return $labels;
	}

}
